package com.cheng.service;

import java.util.List;

import javax.jws.WebService;
import javax.ws.rs.Consumes;
import javax.ws.rs.GET;
import javax.ws.rs.POST;
import javax.ws.rs.PUT;
import javax.ws.rs.Path;
import javax.ws.rs.PathParam;
import javax.ws.rs.Produces;
import javax.ws.rs.QueryParam;

import com.cheng.domain.Customer;
import com.opensymphony.xwork2.validator.annotations.CustomValidator;

//声明webservice
public interface CustomerService {
	
	@GET
	@Path("/noassociationcustomer")
	@Produces({"application/xml","application/json"})
	public List<Customer> getNoassociationCustomer();
	
	@GET
	@Path("/associationcustomer/{fixedareaid}")
	@Produces({"application/xml","application/json"})
	public List<Customer> getAssociationCustomer(@PathParam("fixedareaid") String fixedareaid);
	
	@PUT
	@Path("/associationfixedarea/{fixedareaid}/{customerids}")
	public void updateAssociation(@PathParam("fixedareaid") String fixedareaid,@PathParam("customerids") String customerids);
	
	@POST
	@Path("/registecustomer")
	@Consumes({"application/xml","application/json"})
	public void registeCustomer(Customer customer);
	
	@PUT
	@Path("/activecustomer/{telephone}")
	public void updateCustomer(@PathParam("telephone") String telephone);
	
	@GET
	@Path("/getcustomerbytel/{telephone}")
	@Produces({"application/xml","application/json"})
	public Customer getCustomer(@PathParam("telephone") String telephone);
	
	@GET
	@Path("/getfixedareabyaddress")
	@Produces({"application/xml","application/json"})
	public String getFixedareaByaddress(@QueryParam("address") String address,@QueryParam("id") Integer id);
}
